

enum OspnError: Error, Equatable {
    case None
    case Encode
    case Decode
    case UnknowType
    case HeadOverflow
    case NetworkRecv
    case NetworkSend
    case Timeout
    case Sqlite
    case Config
    case Read
    case Response
    case Package(code:String)
    case Custom(msg:String)
    
    var description: String {
        if case let .Package(code) = self {
            return code
        }
        if case let .Custom(msg) = self {
            return msg
        }
        return ""
    }
}
